package com.jeethink.erp.sale.domain;

import java.math.BigDecimal;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.jeethink.common.core.domain.entity.SysUser;
import com.jeethink.common.core.domain.entity.TbShop;
import com.jeethink.erp.commodity.domain.TbCommodity;
import com.jeethink.erp.saleDetail.domain.TbSaleDetail;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.jeethink.common.annotation.Excel;
import com.jeethink.common.core.domain.BaseEntity;

/**
 * 销售对象 tb_sale
 * 
 * @author ypr
 * @date 2021-06-07
 */
public class TbSale extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 销售表编号 */
    private Long saleId;

    /** 销售日期 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "销售日期", width = 30, dateFormat = "yyyy-MM-dd")
    private Date saleDate;

    /** 销售店铺 */
    @Excel(name = "销售店铺")
    private Long shopId;

    /** 销售人员 */
    @Excel(name = "销售人员")
    private Long userId;

    /** 删除标志（0代表存在 2代表删除） */
    private String delFlag;

    //销售月份
    private String saleMonth;
    //销售年份
    private String saleYear;

    private TbShop tbShop;

    private SysUser sysUser;

    private TbCommodity tbCommodity;

    private TbSaleDetail tbSaleDetail;

    private Long commodityId;

    /** 销售数量 */
    private Integer quantity;

    /** 销售价格 */
    private BigDecimal price;

    /** 是否出库 */
    private String isDelivery;

    public String getIsDelivery() {
        return isDelivery;
    }

    public void setIsDelivery(String isDelivery) {
        this.isDelivery = isDelivery;
    }

    public TbSaleDetail getTbSaleDetail() {
        return tbSaleDetail;
    }

    public void setTbSaleDetail(TbSaleDetail tbSaleDetail) {
        this.tbSaleDetail = tbSaleDetail;
    }

    public Long getCommodityId() {
        return commodityId;
    }

    public void setCommodityId(Long commodityId) {
        this.commodityId = commodityId;
    }

    public Integer getQuantity() {
        return quantity;
    }

    public void setQuantity(Integer quantity) {
        this.quantity = quantity;
    }

    public BigDecimal getPrice() {
        return price;
    }

    public void setPrice(BigDecimal price) {
        this.price = price;
    }

    public TbShop getTbShop() {
        return tbShop;
    }

    public void setTbShop(TbShop tbShop) {
        this.tbShop = tbShop;
    }

    public SysUser getSysUser() {
        return sysUser;
    }

    public void setSysUser(SysUser sysUser) {
        this.sysUser = sysUser;
    }

    public TbCommodity getTbCommodity() {
        return tbCommodity;
    }

    public void setTbCommodity(TbCommodity tbCommodity) {
        this.tbCommodity = tbCommodity;
    }

    public String getSaleMonth() {
        return saleMonth;
    }

    public void setSaleMonth(String saleMonth) {
        this.saleMonth = saleMonth;
    }

    public String getSaleYear() {
        return saleYear;
    }

    public void setSaleYear(String saleYear) {
        this.saleYear = saleYear;
    }

    public void setSaleId(Long saleId)
    {
        this.saleId = saleId;
    }

    public Long getSaleId() 
    {
        return saleId;
    }
    public void setSaleDate(Date saleDate) 
    {
        this.saleDate = saleDate;
    }

    public Date getSaleDate() 
    {
        return saleDate;
    }
    public void setShopId(Long shopId) 
    {
        this.shopId = shopId;
    }

    public Long getShopId() 
    {
        return shopId;
    }
    public void setUserId(Long userId) 
    {
        this.userId = userId;
    }

    public Long getUserId() 
    {
        return userId;
    }
    public void setDelFlag(String delFlag) 
    {
        this.delFlag = delFlag;
    }

    public String getDelFlag() 
    {
        return delFlag;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("saleId", getSaleId())
            .append("saleDate", getSaleDate())
            .append("shopId", getShopId())
            .append("userId", getUserId())
            .append("remark", getRemark())
            .append("createBy", getCreateBy())
            .append("createTime", getCreateTime())
            .append("updateBy", getUpdateBy())
            .append("updateTime", getUpdateTime())
            .append("delFlag", getDelFlag())
            .toString();
    }
}
